package cn.lkp.mall.order.service;

import cn.lkp.common.to.mq.SeckillOrderTo;
import cn.lkp.mall.order.vo.*;
import com.baomidou.mybatisplus.extension.service.IService;
import cn.lkp.common.utils.PageUtils;
import cn.lkp.mall.order.entity.OrderEntity;

import java.util.Map;
import java.util.concurrent.ExecutionException;

/**
 * 订单
 *
 * @author lkp
 * @email 271309236@qq.com
 * @date 2020-11-11 14:45:37
 */
public interface OrderService extends IService<OrderEntity> {

    PageUtils queryPage(Map<String, Object> params);

    OrderConfirmVo toTrade() throws ExecutionException, InterruptedException;

    SubmitOrderResponseVo submitOrder(OrderSubmitVo vo);

    OrderEntity getOrderStatus(String orderSn);

    void closeOrder(OrderEntity orderEntity);

    OrderEntity getOrderByOrderSn(String orderSn);

    PayVo getOrderPay(String orderSn);

    String handlePayResult(PayAsyncVo asyncVo);

    String asyncNotify(String notifyData);

    void updateOrderStatus(String orderSn, Integer code, Integer payType);

    PageUtils queryPageWithItem(Map<String, Object> params);

    void createSeckillOrder(SeckillOrderTo orderTo);
}

